package genealogy.deprecated.datamodel.pedigree.sort;

import genealogy.deprecated.datamodel.pedigree.Date;

import java.util.Comparator;

/**
 * @author Steve
 * @invariant 
 */
@Deprecated
public class ChonologicalDateComparator implements Comparator<Date>{

	/* (non-Javadoc)
	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
	 */
	public int compare(Date dateA, Date dateB) {
		if(dateA == null || dateB == null){
			if(dateA == null && dateB == null){
				return 0;
			}
			else if(dateA == null){
				return -1;
			}
			else{
				return 1;
			}
		}
		return dateB.getInternallNumber() - dateA.getInternallNumber();
	}
}
